import lxml.etree as le
with open('edu.html', 'r', encoding='utf-8')as f:
    html = f.read()
    html_x = le.HTML(html)
    div_x_s = html_x.xpath('//div[@class="classify_cList"]')
    l = list()
    for div in div_x_s:
        conn = div.xpath('./h3/a/text()')[0]
        conns = div.xpath('./div/span/a/text()')
        l.append(
            {
                'cate': conn,
                'cates': conns
            }
        )
    for ll in l:
        print(ll['cate'])
        for i in ll['cates']:
            print('  ', i)


